<?php
/**
 * Created by PhpStorm
 * User: whh
 * Date: 2023/8/21
 * Time: 22:17
 */

namespace app\common\model;


use think\Model;
use think\model\concern\SoftDelete;

class RechargeActivity extends Model
{
    use Common;

    protected $table = 'pay_recharge_activity';
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;

    public function item()
    {
        return $this->hasOne(RechargeItem::class, 'id', 'item_id');
    }


    public function getImgTextAttr($value, $data)
    {
        return config('img_domain') . $data['img_url'];
    }

    public function getPopImgTextAttr($value, $data)
    {
        return config('img_domain') . $data['pop_img'];
    }

    public function getImgAttr($value, $data)
    {
        return config('img_domain') . $data['img_url'];
    }

}